<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.fckeditor.net" prefix="FCK" %> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML>
<html>
	<head>
		<base href="<%=basePath%>">

		<title>修改文章</title>
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>jslib/bootstrap/css/bootstrap.css">
		<link rel="stylesheet" type="text/css"
			href="<%=basePath%>css/theme.css">
		<link rel="stylesheet"
			href="<%=basePath%>jslib/font-awesome/css/font-awesome.css">
		<script src="<%=basePath%>jslib/jquery-1.7.2.min.js"
			type="text/javascript"></script>
	</head>

	<body class="content1">
		<div class="header">
			<h1 class="page-title">
				修改文章
			</h1>
		</div>

		<ul class="breadcrumb">
			<li>
				<a href="index.html">文章管理</a>
				<span class="divider">/</span>
			</li>
			<li class="active">
				文章上传
			</li>
		</ul>

		<div class="container-fluid">
			<div class="row-fluid">
				<form method="post" action="<%=basePath%>sys/article/article?cmd=edit">
					<div class="btn-toolbar">
						<input type="submit" class="btn btn-primary" value="保存修改 ">
						<a href="<%=basePath%>sys/article/article?cmd=listForUploaderAndAdmin" class="btn">取消</a>

					</div>

					<div class="well">
						<div class="tab-pane active in">
							<%-- 错误提示信息 --%>
							<div style="color: red">
								${msg}
							</div>
							<br>
							
							<%-- 文章id放入隐藏域 --%>
							<input type="hidden" name="articleid" value="${item.articleid }">
							
							<%-- 显示文章其余信息 --%>
							<table  border="1" width = "100%">
							  <tr>
							    <td align="center"><label>文章标题：</label></td>
							    <td><input type="text" name="title" maxlength="50" value="${item.title }"></td>
							    
							    <td align="center"><label>文章主题：</label></td>
							    <td><input type="text" name="theme" maxlength="20" value="${item.theme }"></td>
							  </tr>
							  
							  <tr>
							    <td align="center"><label>文章类型：</label></td>
							    <td>
							    	<select name="classid">
										<c:forEach items="${classlist}" var="class">
											<option value="${class.classid}" 
												<c:if test="${class.classid eq item.classid}">
													selected="selected"
												</c:if>
											>
												${class.cname}
											</option>
										</c:forEach>
									</select>
							    </td>
							    
							    <td align="center"><label>责任编辑：</label></td>
							    <td><input type="text" name="editor" maxlength="10" value="${item.editor }"></td>
							  </tr>
							  <tr>
							    <td align="center"><label>文章来源：</label></td>
							    <td><input type="text" name="source" maxlength="10" value="${item.source }"></td>
							    
							    <td align="center"><label>是否图文：</label></td>
							    <td>
							    	<select name="isillustrated">
										<option value="1"
											<c:if test="${item.isillustrated eq 1}">
													selected="selected"
											</c:if>
										>
											是
										</option>
										
										<option value="0"
											<c:if test="${item.isillustrated eq 0}">
													selected="selected"
											</c:if>
										>
											否
										</option>
									</select> 
							    </td>
							  </tr>
							  
							  <%-- 提示语 --%>
							  <tr>
							  	<td colspan="4"  align="center">
							  		<font color="red" size="4px">
							  			注意：一旦提交修改成功，该文章需要被重新审核和发布！
							  		</font>
							  	</td>
							  </tr>
							  
							  <tr>
							  	<td align="center">审核情况</td>
							  	<td align="center">
					  				<c:if test="${item.ischecked == 1}">已通过</c:if>				
									<c:if test="${item.ischecked == -1}">未通过</c:if>		
									<c:if test="${item.ischecked == 0}">未审核</c:if>
							  	</td>
							  	
							  	<td align="center">发布情况</td>
							  	<td align="center">
						  			<c:if test="${item.ispublish == 1}">已发布</c:if>				
									<c:if test="${item.ispublish == -1}">不发布</c:if>		
									<c:if test="${item.ispublish == 0}">未查看</c:if>
							  	</td>
							  </tr>
							  
							  <tr>
							    <td  align="center"><label>文章内容：</label></td>
							    <td colspan="3">
							    	<%-- fckeditor插件 --%>
									<FCK:editor instanceName="content" height="800"> 
										<jsp:attribute name="value" > 
											${item.content}
										</jsp:attribute> 
									</FCK:editor>
							    </td>
							  </tr>
							</table>
						</div>
					</div>
				</form>
			</div>
		</div>
	</body>
</html>
